home *** CD-ROM | disk | FTP | other *** search
- Path: galaxy.ucr.edu!not-for-mail
- From: thp@cs.ucr.edu (Tom Payne)
- Newsgroups: comp.lang.c++,comp.lang.java
- Subject: Re: Java: What's the Big Deal?
- Followup-To: comp.lang.c++,comp.lang.java
- Date: 21 Mar 1996 15:52:07 GMT
- Organization: University of California, Riverside
- Message-ID: <4irtv7$cnl@galaxy.ucr.edu>
- References: <milodDoF9JF.K32@netcom.com> <1996Mar20.154600.12011@amc.com> <milodDoL1uy.581@netcom.com>
- NNTP-Posting-Host: corvette.ucr.edu
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- John DiCamillo (milod@netcom.com) wrote:
- : curtis@amc.com (Curtis Green) writes:
- : >John DiCamillo (milod@netcom.com) wrote:
- : >: pete@borland.com (Pete Becker) writes:
- :
- : >: >There's no reason you can't write a C++ compiler that generates a Java
- : >: >bytestream.
- :
- : >: Are you claiming that arbitrary, correct (ANSI) C++ code can
- : >: be compiled to the JVM and continue to work correctly? Or are
- : >: you claiming that a compiler can be written that will translate
- : >: some limited subset of C++ into JVM?
- :
- : >you would just need a proper backend to do the translation into a
- : >JAVA virtual
- : >machine compatible bytestream
- :
- : You seem convinced that it is possible to create such a "proper
- : backend". Given the semantic differences between C++ pointers
- : and arrays and Java references and arrays, I remain skeptical.
-
- As long as JVM supports arrays, it is probably not too difficult to
- use one to emulate main memory (and its indices to emulate pointers).
- Still, there can be performance-killing devils lurking in the details,
- e.g., unions, bit-wise operations, etc.
-
- More to the point, one can write a compiler (e.g., yet another
- targeting of g++) that will be about as efficient as Java on the
- subset of C++ supprted by Java.
-
- Tom Payne (thp@cs.ucr.edu)
-